import sys
from os import getcwd
from PyQt4.QtGui import QSystemTrayIcon,QApplication,QAction,QIcon,QMenu
from PyQt4.QtCore import QTextCodec,Qt
from MainWindow  import *
from MainEngines  import *
reload(sys)
sys.setdefaultencoding('utf8')

def main(args):
    app = QApplication(sys.argv)
    app.lastWindowClosed.connect(app.quit)
    mEngine = MainEngine()
    mainWin = MainWindow(mEngine.eEngine, mEngine)
    mainWin.showMaximized()
    sys.exit(app.exec_())
if __name__ == "__main__":
    main(sys.argv)